package study.exception;


public enum ErrorDefine implements ErrorDefineInterface {
    SUCCESS("0000", "成功"),
    UNKNOWN_ERROR("9999","系统未知异常！"),
    PASSWORD_USERNAME_NULL("1001", "用户名或密码为空！"),
    PASSWORD_USERNAME_ERROR("1002", "用户名或密码错误！"),
    NOT_AUTHORIZED("1003","未授权！"),
    PERMISSION_DENIED("1004","拒绝访问！"),
    TWO_PASSWORD_INCONSISTENCY("1005","两次密码输入不一致！"),
    NEW_OLD_PASSWORD_CONSISTENCY("1006","新密码和原密码一样！"),
    REQUESTS_TOO_FREQUENT("1007","请求过于频繁，请稍后重试！"),
    SERVER_BUSY("1008","服务正忙，请稍后重试！");


    public  String code;
    public  String message;

    ErrorDefine(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
